-- GENERATED SPELL FOR [Ethereum Prisoner] --


function spell0_20520(pUnit, Event) --@Glaive,n/a--
pUnit:FullCastSpellOnTarget(36500,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20520', 556, 1)
end

function spell1_20520(pUnit, Event) --@Hamstring,n/a--
pUnit:FullCastSpellOnTarget(31553,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20520', 10347, 1)
end

function spell2_20520(pUnit, Event) --@Reputation: +500 Cenarion Expedition,n/a--
pUnit:FullCastSpellOnTarget(39460,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20520', 551, 1)
end

function spell3_20520(pUnit, Event) --@Reputation: +500 Consortium,n/a--
pUnit:FullCastSpellOnTarget(39474,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20520', 673, 1)
end

function spell4_20520(pUnit, Event) --@Reputation: +500 Keepers of Time,n/a--
pUnit:FullCastSpellOnTarget(39475,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20520', 611, 1)
end

function spell5_20520(pUnit, Event) --@Reputation: +500 Lower City,n/a--
pUnit:FullCastSpellOnTarget(39456,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20520', 544, 1)
end

function spell6_20520(pUnit, Event) --@Reputation: +500 Sporeggar,n/a--
pUnit:FullCastSpellOnTarget(39476,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20520', 573, 1)
end

function spell7_20520(pUnit, Event) --@Reputation: +500 The Sha\'tar,n/a--
pUnit:FullCastSpellOnTarget(39457,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20520', 621, 1)
end

function Sorts_20520(pUnit, Event)
local choix_sorts_20520 = math.random(0, 7)
if choix_sorts_20520 == 0 then
pUnit:RegisterEvent('spell0_20520', 1, 1)
end
if choix_sorts_20520 == 1 then
pUnit:RegisterEvent('spell1_20520', 1, 1)
end
if choix_sorts_20520 == 2 then
pUnit:RegisterEvent('spell2_20520', 1, 1)
end
if choix_sorts_20520 == 3 then
pUnit:RegisterEvent('spell3_20520', 1, 1)
end
if choix_sorts_20520 == 4 then
pUnit:RegisterEvent('spell4_20520', 1, 1)
end
if choix_sorts_20520 == 5 then
pUnit:RegisterEvent('spell5_20520', 1, 1)
end
if choix_sorts_20520 == 6 then
pUnit:RegisterEvent('spell6_20520', 1, 1)
end
if choix_sorts_20520 == 7 then
pUnit:RegisterEvent('spell7_20520', 1, 1)
end
end

function mob20520_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20520', math.random(1500, 3000), 1)
end

function mob20520_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20520_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20520_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20520, 1, 'mob20520_Action')
RegisterUnitEvent(20520, 2, 'mob20520_Leave')
RegisterUnitEvent(20520, 3, 'mob20520_Kill')
RegisterUnitEvent(20520, 4, 'mob20520_Die')
